import java.util.Scanner;

public class 发巧克力 {
    private static int nums[][];
    private static int k;

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        nums = new int[n][2];
        k = scan.nextInt();
        for (int i = 0; i < n; i++) {
            nums[i][0] = scan.nextInt();
            nums[i][1] = scan.nextInt();
        }
//        for (int i = 0; i < n; i++) {
//            System.out.println(Arrays.toString(nums[i]));
//        }
        //处理数据
        int left = 1;
        int right = 200050;
        while (left < right) {
            int mid = left + right + 1 >> 1;
            //规定：为true时，移动左指针
            if (check(mid))
                left = mid;
            else right = mid - 1;
        }
        System.out.println(left);
    }

    private static boolean check(int mid) {
        //切割巧克力
        int length = nums.length;
        int total = 0;
        for (int i = 0; i < length; i++) {
            total += (nums[i][0] / mid) * (nums[i][1] / mid);
            if (total >= k)
                return true;
        }

        return false;
    }
}
